package com.sservice.service.service;

import com.sservice.urp.entity.Role;
import com.sservice.urp.entity.UserRole;
import com.sservice.urp.vo.RolePermissionUnion;
import com.sservice.urp.vo.RoleVo;
import com.sservice.base.entity.dto.ListResult;
import java.util.List;

public interface IRoleService {

    /**
     * 权限列表
     *
     * @return
     */
    public List<Role> queryAll();

    int deleteByPrimaryKey(Integer id);

    int insertSelective(Role arg);

    Role selectByPrimaryKey(Integer id);

    /**
     * 权限修改
     *
     * @param arg
     * @return
     */
    int updateByPrimaryKeySelective(Role arg);

    List<Role> getRolesByUserID(int userid);

    List<Role> getRoleList(Role role);

    List<RolePermissionUnion> queryAllRoleWithPermission();

    List<Role> getUserRoleByUserId(int userid);

    /**
     * 根据role_id 统计
     *
     * @param userid
     * @return
     */
    int queryByRoleId(UserRole userid);

    /**
     * 角色分页
     *
     * @param role
     * @return
     */
    ListResult queryByPage(RoleVo role);

}
